import request from '@/utils/request'
import Cookies from 'js-cookie'

// 获取列表
export function getList(data,page) {
    return request({
        url: '/House_transfers_platform_send/transfer_send_list/'+ (page ? page : 1),
        method: 'post',
        data: data
    })
}
//获取页码
export function getPage(data) {
    return request({
        url: '/House_transfers_platform_send/transfer_send_page',
        method: 'post',
        data: data 
    })
}
// 获取门店
export function getStore(data) {
    return request({
        url: '/General/get_store',
        method: 'post',
        data: data
    })
}
export function house() {
    return request({
        url: "/General/get_house",
        method: "post",
        data: ''
    })
}
// 发货单下载
export function getExport(data) {
    // window.location.href = `http://dev.hahaipi.com/smsi/index.php/House_transfers_platform_send/transfer_order_print?order_id=${data.order_id}&didixueshengka=${Cookies.get('SMS_AdminToken')}`; 
    window.location.href = `https://${location.host}/smsi/index.php/House_transfers_platform_send/transfer_order_print?order_id=${data.order_id}&didixueshengka=${Cookies.get('SMS_AdminToken')}`; 
}